#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include"qipan.h"
#include <QMainWindow>
#include"gamelogic.h"
#include<QTimer>
namespace Ui {
class MainWindow;
}

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    explicit MainWindow(QWidget *parent = nullptr);
    ~MainWindow();

signals:
    void gameStartedChanged(bool started);  // 当游戏开始状态改变时发射此信号

public slots:
    void handchessClickslot(int row,int col);
     void handleAichessPoslot(int row,int col);
     void startTimer();
     void updateTime();
     void resetTimer();

private:
    Ui::MainWindow *ui;
    qipan *m_qipan;
    GameLogic *m_logic;
    QTimer *m_timer;
    int seconds;
    bool gameStarted;

};

#endif // MAINWINDOW_H
